/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 绑定微信小程序openid POST /tourism/client/c/fzuser/bindWxOpenId */
export async function bindWxOpenIdUsingPost({
  body,
  options,
}: {
  body: API.BizFzUserWxBindParam;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultBoolean_>(
    '/tourism/client/c/fzuser/bindWxOpenId',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 获取分账用户表详情 GET /tourism/client/c/fzuser/detail */
export async function detailUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.detailUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultBizFzUser_>(
    '/tourism/client/c/fzuser/detail',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 编辑分账用户表 POST /tourism/client/c/fzuser/edit */
export async function editUsingPost({
  body,
  options,
}: {
  body: API.BizFzUserEditParam;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultString_>('/tourism/client/c/fzuser/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取分账用户邀请码 GET /tourism/client/c/fzuser/getInviteCode */
export async function getInviteCodeUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.getInviteCodeUsingGETParams;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultString_>(
    '/tourism/client/c/fzuser/getInviteCode',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 获取全量分账用户列表 GET /tourism/client/c/fzuser/list */
export async function listUsingGet1({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.listUsingGET1Params;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultListBizFzUser_>(
    '/tourism/client/c/fzuser/list',
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** 注册分销用户 POST /tourism/client/c/fzuser/register */
export async function registerUsingPost({
  body,
  options,
}: {
  body: API.BizFzUserRegisterParam;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultMapStringObject_>(
    '/tourism/client/c/fzuser/register',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 微信小程序登录 POST /tourism/client/c/fzuser/wxLogin */
export async function wxLoginUsingPost({
  body,
  options,
}: {
  body: API.BizFzUserWxLoginParam;
  options?: CustomRequestOptions;
}) {
  return request<API.CommonResultMapStringObject_>(
    '/tourism/client/c/fzuser/wxLogin',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  );
}
